package ${(introspectedTable.tableConfiguration.properties.fileDirectoryService)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryService)?index_of("/src/main/java/")+15))?replace("/",".")};

import com.broker.framework.common.pojo.CommonLongRespDTO;
import com.broker.framework.common.pojo.PageParam;
import com.broker.framework.common.pojo.PageResult;
import ${(introspectedTable.tableConfiguration.properties.fileDirectoryDTO)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryDTO)?index_of("/src/main/java/")+15))?replace("/",".")}.${className}DTO;
import ${(introspectedTable.tableConfiguration.properties.fileDirectoryQueryDTO)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryQueryDTO)?index_of("/src/main/java/")+15))?replace("/",".")}.${className}QueryDTO;
import ${(introspectedTable.tableConfiguration.properties.fileDirectoryDO)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryDO)?index_of("/src/main/java/")+15))?replace("/",".")}.${className}DO;
import java.util.Optional;

import java.util.List;

/***
 * ---------------------------
 * @Description: 表备注：${introspectedTable.remarks!}<#--deal null-->
 * 针对表【${introspectedTable.tableConfiguration.schema!}.${introspectedTable.fullyQualifiedTable.introspectedTableName}】的Service
 * ---------------------------
* @author: ${introspectedTable.tableConfiguration.properties.auther!}
* @date: ${introspectedTable.tableConfiguration.properties.createTime!}
 * @version: v1.0
 * ---------------------------
 */
public interface ${className}Service {


    /**
     * *---------------------------
     * @Description: 根据id获取
     * **---------------------------
     * @param id the id
     * @return
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    ${className}DO get(Long id);

    /**
     * *---------------------------
     * @Description: 获取分页-共用排序
     * **---------------------------
     * @param queryDTO the query dto
     * @param pageParam the page param
     * @return page by query dto
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    PageResult<${className}DO> getPageByQueryDTO(${className}QueryDTO queryDTO, PageParam pageParam);

    /**
     * *---------------------------
     * @Description: get list by query dto.
     * **---------------------------
     * @param queryDTO the query dto
     * @return list by query dto
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    List<${className}DTO> getListByQueryDTO(${className}QueryDTO queryDTO);

    /**
     * *---------------------------
     * @Description: get one by query dto.
     * **---------------------------
     * @param queryDTO the query dto
     * @return one by query dto
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    ${className}DTO getOneByQueryDTO(${className}QueryDTO queryDTO);

    /**
     * *---------------------------
     * @Description: by query dto.
     * **---------------------------
     * @param queryDTO the query dto
     * @return by query dto
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    CommonLongRespDTO countByQueryDTO(${className}QueryDTO queryDTO);

    /***
    * *---------------------------
    * @Description: 删除
    * **---------------------------
     * @param queryDTO
     * @return void
    * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
    * @version: v1.0
    * ****---------------------------
    */
    void deleteByQueryDTO(${className}QueryDTO queryDTO);

<#list introspectedTable.nonPrimaryKeyColumns as baseColumns>
    <#if baseColumns.actualColumnName?last_index_of("_id")!=-1 && baseColumns.actualColumnName !="tenant_id">
    /**
     * *---------------------------
     * @Description: get by ${baseColumns.javaProperty?cap_first}
     * **---------------------------
     * @param ${baseColumns.javaProperty}
     * @return List<${className}DTO>
     * ***---------------------------
     * @author: ${introspectedTable.tableConfiguration.properties.auther!}
     * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
     * @version: v1.0
     * ****---------------------------
     */
    List<${className}DTO> getBy${baseColumns.javaProperty?cap_first}(${baseColumns.fullyQualifiedJavaType.shortNameWithoutTypeArguments} ${baseColumns.javaProperty});
    </#if>
</#list>


}